package com.nonsense.textsummary

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp


@Composable
fun Test3() {
    var i by remember { mutableStateOf(0) }

    Column() {
        TextButton(onClick = { i++ }) {
            Text("add 1")
        }
        Text(text = "$i")
    }

}

@Composable
fun Test2() {
    Box(
        modifier = Modifier
            .fillMaxSize()
            .background(Color.Magenta)
            .systemBarsPadding(),
    ) {
        LazyColumn(
            verticalArrangement = Arrangement.spacedBy(22.dp)
        ) {
            items(20) {
                Text(text = "第 $it 项")
            }
        }
    }
}

